﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace SMARTMobile.Views
{
    public partial class ChupHinhPage
    {
        public ChupHinhPage()
        {
            InitializeComponent();

            //BitmapImage bmp = new BitmapImage();
            //bmp = new BitmapImage(new Uri(fileName, UriKind.Relative));
            //////bmp.SetSource(e.ImageStream);
            //ImageBrush ib = new ImageBrush();
            //ib.ImageSource = bmp;
            //viewfinderCanvas.Background = ib;
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string msg;
            if (NavigationContext.QueryString.TryGetValue("msg", out msg))
            {
                BitmapImage bmp = new BitmapImage();
                bmp = new BitmapImage(new Uri(msg, UriKind.Relative));
                imgphoto.Source = bmp;
                ////ImageBrush ib = new ImageBrush();
                ////ib.ImageSource = bmp;
                ////imgphoto.Background = ib;
            }
        }
    }
}